package com.situ.mpgenerator.controller;


import com.situ.mpgenerator.pojo.Student;
import com.situ.mpgenerator.pojo.User;
import com.situ.mpgenerator.service.IStudentService;
import com.situ.mpgenerator.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author Gao
 * @since 2023-10-18
 */
@RestController
//@CrossOrigin
@RequestMapping("/student")
public class StudentController {
    @Autowired
    private IStudentService studentService;

    @GetMapping("/selectAll")
    public List<Student> selectAll() {
        List<Student> list = studentService.list();
        return list;
    }
}

